package com.example.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author chenmin
 * @Description 阿里云SMS短信发送工具类
 */
@Component
public class SmsUtils implements InitializingBean {

	@Value("${aliyun.sms.endpoint}")
	private String endpoint;

	@Value("${aliyun.sms.accessKeyId}")
	private String accessKeyId;

	@Value("${aliyun.sms.secret}")
	private String secret;

	@Value("${aliyun.sms.domain}")
	private String domain;

	@Override
	public void afterPropertiesSet() throws Exception {
		EDNPOINT=endpoint;
		ACCESS_KEY_ID=accessKeyId;
		SECRECT=secret;
		DOMAIN=domain;
	}

	//在阿里云短息服务->国内消息->模板管理查看
	public static final String VALIDATE_CODE = "SMS_468960817";//发送短信验证码
	public static final String ORDER_NOTICE = "SMS_302115541"; //体检预约成功通知
	public static String EDNPOINT;
	public static String ACCESS_KEY_ID;
	public static String SECRECT;
	public static String DOMAIN;

}
